package main

import "fmt"

func main() {
	// 通过make创建
	var userInfo = make(map[string]string)
	userInfo["username"] = "zhangsan"
	userInfo["password"] = "123456"
	userInfo["gender"] = "男"
	userInfo["age"] = "18"
	fmt.Println(userInfo)
	fmt.Println(userInfo["username"])

	// 创建的同时初始化
	var userInfo2 = map[string]string{
		"username": "lisi",
		"password": "123456",
		"gender":   "女",
		"age":      "18",
	}
	fmt.Println(userInfo2)
	fmt.Println(userInfo2["username"])
}
